$wixFile = [System.IO.Path]::Combine( (Get-Location), $args[0]) 
$customActionFile = $args[1]

$toreplace = get-content $wixFile
$toreplace = $toreplace -replace "%CustomActionFileName%", $customActionFile
$toreplace | set-content $wixFile
$doc = new-object System.Xml.XmlDocument
$doc.Load($wixFile)
$nsmgr = new-object System.Xml.XmlNamespaceManager($doc.get_NameTable())
$nsmgr.AddNamespace("ab","http://schemas.microsoft.com/wix/2006/wi")
$installerFileNode = $doc.SelectSingleNode("//ab:File[@Name='" + $customActionFile + "']",$nsmgr)
$installerFileNode.get_Attributes().ItemOf("Id").set_Value("F_" + $customActionFile)
$installerFileNode.get_ParentNode().get_Attributes().ItemOf("Id").set_Value("C_" + $customActionFile)
$doc.Save($wixFile)
